From cc43680e5e16b296db0d292f161d2e03f2e3364d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 21 Oct 2014 08:35:05 -0700 Subject: [PATCH] Update dependencies to unbreak the build --- Cargo.lock | 38 +++++++++++++++++----------------- src/cargo/core/dependency.rs | 3 ++- src/cargo/core/source.rs | 4 ++-- tests/support/paths.rs | 6 +++--- tests/test_cargo_build_auth.rs | 4 ++-- tests/test_cargo_compile.rs | 6 +++--- tests/test_cargo_run.rs | 4 ++-- 7 files changed, 33 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b44ae28f..010c4bce5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,32 +2,32 @@ name = "cargo" version = "0.0.1-pre" dependencies = [ - "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#1d43e08f629dc22ffbc99d7ea8e97dfc7ab0b91a)", + "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#36b015de91daf6310227cec04ef30acf5929dfb6)", "docopt 0.6.4 (git+https://github.com/docopt/docopt.rs#4544a9f422b115c2ffef4ee9baf27ceb07c34602)", "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#68971ae77a523c7ec3f19b4bcd195f76291ea390)", "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#c01b0b279470552c48cf7f902ae5baf132df0a6d)", - "glob 0.0.1 (git+https://github.com/rust-lang/glob#27338cbd4736d3c8146294fc090c6f8f06c32d72)", + "glob 0.0.1 (git+https://github.com/rust-lang/glob#469a6bc1a0fc289ab220170e691cffbc01dcf1e6)", "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git#7d46e76514ac606530dfb0e93270fffcf64ca76d)", "semver 0.1.0 (git+https://github.com/rust-lang/semver#5dee918159d4e3d84c1ee54cf6a5305e6f7bd557)", "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#943d7c0173c7fa5e8c58978add0180569c68d7f7)", - "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#05c1eb420f54569336b8481c28a46b5a7c51ec99)", - "url 0.1.0 (git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b)", + "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#8a3ba4c65cfa22a3d924293a1fb3a70bfac5e66c)", + "url 0.1.0 (git+https://github.com/servo/rust-url#7f1991d847fb8cf8648def2ff121bae90b89131f)", ] [[package]] name = "curl" version = "0.0.1" -source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#1d43e08f629dc22ffbc99d7ea8e97dfc7ab0b91a" +source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#36b015de91daf6310227cec04ef30acf5929dfb6" dependencies = [ - "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#1d43e08f629dc22ffbc99d7ea8e97dfc7ab0b91a)", - "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#0afbf50ba545ac379292b6040330f2903ca891d2)", - "url 0.1.0 (git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b)", + "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#36b015de91daf6310227cec04ef30acf5929dfb6)", + "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#0202cc8aa74a7b0bdbaef4eef368d0bc80f63691)", + "url 0.1.0 (git+https://github.com/servo/rust-url#7f1991d847fb8cf8648def2ff121bae90b89131f)", ] [[package]] name = "curl-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#1d43e08f629dc22ffbc99d7ea8e97dfc7ab0b91a" +source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#36b015de91daf6310227cec04ef30acf5929dfb6" [[package]] name = "docopt" @@ -37,7 +37,7 @@ source = "git+https://github.com/docopt/docopt.rs#4544a9f422b115c2ffef4ee9baf27c [[package]] name = "encoding" version = "0.1.0" -source = "git+https://github.com/lifthrasiir/rust-encoding#ff55916fec8b5bf8667a74d5a060c8c951f28fe0" +source = "git+https://github.com/lifthrasiir/rust-encoding#dd6183298e20b038fcd1cc4ab91405b3c72e49db" [[package]] name = "flate2" @@ -50,13 +50,13 @@ version = "0.0.1" source = "git+https://github.com/alexcrichton/git2-rs#c01b0b279470552c48cf7f902ae5baf132df0a6d" dependencies = [ "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#c01b0b279470552c48cf7f902ae5baf132df0a6d)", - "url 0.1.0 (git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b)", + "url 0.1.0 (git+https://github.com/servo/rust-url#7f1991d847fb8cf8648def2ff121bae90b89131f)", ] [[package]] name = "glob" version = "0.0.1" -source = "git+https://github.com/rust-lang/glob#27338cbd4736d3c8146294fc090c6f8f06c32d72" +source = "git+https://github.com/rust-lang/glob#469a6bc1a0fc289ab220170e691cffbc01dcf1e6" [[package]] name = "hamcrest" @@ -69,8 +69,8 @@ version = "0.0.1" source = "git+https://github.com/alexcrichton/git2-rs#c01b0b279470552c48cf7f902ae5baf132df0a6d" dependencies = [ "libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys#80e71a3021618eb05656c58fb7c5ef5f12bc747f)", - "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#0afbf50ba545ac379292b6040330f2903ca891d2)", - "openssl-static-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-static-sys#b01801397328924055fb1c7c87fd5bf18907e511)", + "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#0202cc8aa74a7b0bdbaef4eef368d0bc80f63691)", + "openssl-static-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-static-sys#d218fa63aabefb3ac56a44985e2df8a2dc932450)", ] [[package]] @@ -81,12 +81,12 @@ source = "git+https://github.com/alexcrichton/libssh2-static-sys#80e71a3021618eb [[package]] name = "link-config" version = "0.0.1" -source = "git+https://github.com/alexcrichton/link-config#0afbf50ba545ac379292b6040330f2903ca891d2" +source = "git+https://github.com/alexcrichton/link-config#0202cc8aa74a7b0bdbaef4eef368d0bc80f63691" [[package]] name = "openssl-static-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/openssl-static-sys#b01801397328924055fb1c7c87fd5bf18907e511" +source = "git+https://github.com/alexcrichton/openssl-static-sys#d218fa63aabefb3ac56a44985e2df8a2dc932450" [[package]] name = "semver" @@ -101,13 +101,13 @@ source = "git+https://github.com/alexcrichton/tar-rs#943d7c0173c7fa5e8c58978add0 [[package]] name = "toml" version = "0.1.0" -source = "git+https://github.com/alexcrichton/toml-rs#05c1eb420f54569336b8481c28a46b5a7c51ec99" +source = "git+https://github.com/alexcrichton/toml-rs#8a3ba4c65cfa22a3d924293a1fb3a70bfac5e66c" [[package]] name = "url" version = "0.1.0" -source = "git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b" +source = "git+https://github.com/servo/rust-url#7f1991d847fb8cf8648def2ff121bae90b89131f" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#ff55916fec8b5bf8667a74d5a060c8c951f28fe0)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#dd6183298e20b038fcd1cc4ab91405b3c72e49db)", ] diff --git a/src/cargo/core/dependency.rs b/src/cargo/core/dependency.rs index 2585d6e34..79485a5d5 100644 --- a/src/cargo/core/dependency.rs +++ b/src/cargo/core/dependency.rs @@ -25,7 +25,8 @@ impl Dependency { /// use cargo::core::SourceId; /// use cargo::core::Dependency; /// - /// Dependency::parse("color", Some("1.*"), SourceId::for_central()) + /// Dependency::parse("color", Some("1.*"), + /// &SourceId::for_central().unwrap()).unwrap(); /// ``` pub fn parse(name: &str, version: Option<&str>, diff --git a/src/cargo/core/source.rs b/src/cargo/core/source.rs index 8c5369077..6b029b700 100644 --- a/src/cargo/core/source.rs +++ b/src/cargo/core/source.rs @@ -167,7 +167,7 @@ impl SourceId { /// use cargo::core::SourceId; /// SourceId::from_url("git+https://github.com/alexcrichton/\ /// libssh2-static-sys#80e71a3021618eb05\ - /// 656c58fb7c5ef5f12bc747f".to_string()) + /// 656c58fb7c5ef5f12bc747f".to_string()); /// ``` pub fn from_url(string: String) -> SourceId { let mut parts = string.as_slice().splitn(1, '+'); @@ -247,7 +247,7 @@ impl SourceId { } /// Returns the `SourceId` corresponding to the main repository. - /// + /// /// This is the main cargo registry by default, but it can be overridden in /// a `.cargo/config`. pub fn for_central() -> CargoResult { diff --git a/tests/support/paths.rs b/tests/support/paths.rs index 97ac8262e..93078b280 100644 --- a/tests/support/paths.rs +++ b/tests/support/paths.rs @@ -1,6 +1,6 @@ use std::io::IoResult; use std::io::fs::{mod, PathExtensions}; -use std::sync::atomics; +use std::sync::atomic; use std::{io, os}; use cargo::util::realpath; @@ -9,7 +9,7 @@ static CARGO_INTEGRATION_TEST_DIR : &'static str = "cit"; local_data_key!(task_id: uint) -static mut NEXT_ID: atomics::AtomicUint = atomics::INIT_ATOMIC_UINT; +static NEXT_ID: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT; pub fn root() -> Path { let my_id = *task_id.get().unwrap(); @@ -91,7 +91,7 @@ impl PathExt for Path { /// Ensure required test directories exist and are empty pub fn setup() { - let my_id = unsafe { NEXT_ID.fetch_add(1, atomics::SeqCst) }; + let my_id = NEXT_ID.fetch_add(1, atomic::SeqCst); task_id.replace(Some(my_id)); debug!("path setup; root={}; home={}", root().display(), home().display()); root().rm_rf().unwrap(); diff --git a/tests/test_cargo_build_auth.rs b/tests/test_cargo_build_auth.rs index 3be3f3b97..2ad72d334 100644 --- a/tests/test_cargo_build_auth.rs +++ b/tests/test_cargo_build_auth.rs @@ -50,7 +50,7 @@ test!(http_auth_offered { "GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1", "Accept: */*", "User-Agent: git/1.0 (libgit2 0.21.0)", - ].move_iter().map(|s| s.to_string()).collect()); + ].into_iter().map(|s| s.to_string()).collect()); drop(s); let mut s = BufferedStream::new(a.accept().unwrap()); @@ -65,7 +65,7 @@ test!(http_auth_offered { "Authorization: Basic Zm9vOmJhcg==", "Accept: */*", "User-Agent: git/1.0 (libgit2 0.21.0)", - ].move_iter().map(|s| s.to_string()).collect()); + ].into_iter().map(|s| s.to_string()).collect()); tx.send(()); }); diff --git a/tests/test_cargo_compile.rs b/tests/test_cargo_compile.rs index 21caae852..665e91e84 100644 --- a/tests/test_cargo_compile.rs +++ b/tests/test_cargo_compile.rs @@ -565,8 +565,8 @@ test!(custom_multiple_build { .file("src/foo.rs", r#" fn main() { let args = ::std::os::args(); - assert_eq!(args.get(1), &"hello".to_string()); - assert_eq!(args.get(2), &"world".to_string()); + assert_eq!(args[1], "hello".to_string()); + assert_eq!(args[2], "world".to_string()); } "#); assert_that(build1.cargo_process("build"), @@ -586,7 +586,7 @@ test!(custom_multiple_build { .file("src/bar.rs", r#" fn main() { let args = ::std::os::args(); - assert_eq!(args.get(1), &"cargo".to_string()); + assert_eq!(args[1], "cargo".to_string()); } "#); assert_that(build2.cargo_process("build"), diff --git a/tests/test_cargo_run.rs b/tests/test_cargo_run.rs index 61490b865..f05aac810 100644 --- a/tests/test_cargo_run.rs +++ b/tests/test_cargo_run.rs @@ -42,8 +42,8 @@ test!(simple_with_args { "#) .file("src/main.rs", r#" fn main() { - assert_eq!(std::os::args().get(1).as_slice(), "hello"); - assert_eq!(std::os::args().get(2).as_slice(), "world"); + assert_eq!(std::os::args()[1].as_slice(), "hello"); + assert_eq!(std::os::args()[2].as_slice(), "world"); } "#); -- 2.30.2